package jps.interpreter.envs;

import jps.result.ReferenceResult;
import edu.pjwstk.jps.datastore.ISBAObject;
import edu.pjwstk.jps.interpreter.envs.IENVSBinder;
import edu.pjwstk.jps.result.IAbstractQueryResult;

public class ENVSBinder implements IENVSBinder {
	protected String name;
	protected IAbstractQueryResult value;

	public ENVSBinder(String aName, IAbstractQueryResult aValue) {
		name = aName;
		value = aValue;
	}

	public ENVSBinder(ISBAObject o) {
		this(o.getName(), ReferenceResult.createFromSBAObject(o));
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public IAbstractQueryResult getValue() {
		return value;
	}
}
